package com.editso.haier.base;

import com.editso.haier.entity.Role;

/**
 * 基础角色
 * */
public enum  Roles {
    ROLE_USER("user", "普通权限"),
    ROLE_ADMIN( "admin","可管理后台");

    private final String name;
    private final String description;

    Roles(String name, String description) {
        this.name = name;
        this.description = description;
    }

    public String getName() {
        return name;
    }

    public String getDescription() {
        return description;
    }

    public Role getRole(){
        return new Role(name, description);
    }
}
